home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 4_6.lha / 4_6 / prsedgewick.c < prev    next >
Text File  |  1993-08-08  |  407b  |  20 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <stream.h>
  6.  
  7. oid prsedgewick(int *a, int left, int right, int i)
  8.  
  9.    for (int j = 0; j < left; j++)
  10. cout << "    ";
  11.  
  12.    for ( ; j <= right; j++)
  13. if (j == i)
  14.     cout << "[" << chr(a[j]) << "] ";
  15. else
  16.     cout << " " << chr(a[j]) << "  ";
  17.  
  18.    cout << "\n";
  19.  
  20.